<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="utf-8">
	<title>隐患</title>
	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<link rel="stylesheet" type="text/css" href="/common/css/public.css">
	<link rel="stylesheet" type="text/css" href="/common/css/style.css">
</head>
<body>
<input type="hidden" id="openId" th:value="${openId}">
<div class="home_bod">
	<!--top start-->
	<div class="home_top">
		<p th:text="'—'+${userData.organizationName}+'—'">—江苏沙钢集团—</p>
		<span th:text="${userData.fullName}">王小山</span>
	</div>
	<!--top end-->
	<!--center top-->
	<div class="home_entrance">
		<ul>
			<li id="hiddenSubmit">
				<a>
					<img src="/common/images/home_icon0.png" />
					<font>闭环填报</font>
				</a>
			</li>
			<li id="limitSubmit">
				<a>
					<img src="/common/images/home_icon1.png" />
					<font>限期填报</font>
				</a>
			</li>
			<li id="myHidden">
				<a>
					<img src="/common/images/home_icon_two.png" />
					<font>我的隐患</font>
				</a>
			</li>
			<li id="myDeptHidden">
				<a>
					<img src="/common/images/home_icon_three.png" />
					<font>本单位隐患</font>
				</a>
			</li>
			<div class="clear_both"></div>
		</ul>
	</div>
	<div class="home_top_center">
		<ul>
			<li>
				<span>整改隐患</span>
				<font th:text="${report.FixdCount}">22</font>
			</li>
			<li>
				<span>排查隐患</span>
				<font th:text="${report.FoundCount}">22</font>
			</li>
			<li>
				<span>整改率%</span>
				<font th:text="${report.Persent}">22</font>
			</li>
			<div class="clear_both"></div>
		</ul>
	</div>
	<!--center end-->
	<!--list start-->
	<ul class="home_list_nav">
		<div class="home_list_title">
			<span class="fleft">隐患通报</span>
			<a class="fright" id="more-bulletin">更多</a>
			<div class="clear_both"></div>
		</div>
		<li th:each="bulletin,index:${latests}" th:class="${IsOverdue == true} ? 'home_list_problem'">
			<div class="list_desc">
				<input th:value="${bulletin.Status}" type="hidden" class="status">
				<input th:value="${bulletin.ID}" type="hidden" class="id">
				<p class="fleft" th:text="${bulletin.HDName}"></p>
				<font class="fright" th:text="${bulletin.DeadLine}">15天06时32分32秒</font>
				<div class="clear_both"></div>
				<span class="fleft" th:text="${bulletin.ResOrganizationName}">安全部</span>
				<span class="fright" th:text="${bulletin.ResUserName}">张某某</span>
				<div class="clear_both"></div>

			</div>

		</li>

	</ul>
	<!--list end-->
</div>
<!--foot start-->
<div class="home_foot">
	<ul>
		<li class="home_foot_on">
			<a id="home">
				<img src="/common/images/foot_one_on.png" />
				首页
			</a>
		</li>
		<li>
			<a class="chart">
				<img src="/common/images/foot_two.png" />
				统计分析
			</a>
		</li>
		<li>
			<a href="/hidden/library">
				<img src="/common/images/foot_three.png" />
				隐患库
			</a>
		</li>
		<div class="clear_both"></div>
	</ul>
</div>
<!--foot end-->
</body>
</html>
<script src="/common/js/jquery.js"></script>
<script src="/common/js/common.js"></script>
<script>
    var openId = $("#openId").val();
//	if(userData != "" && userData != null){
    //更多隐患通报
    $("#more-bulletin").click(function () {
        location.href = "/hidden/report?userId="+$.userOperate.userId();
    });

	$("#home").click(function () {
        location.href = "/hidden/home?openId="+$.userOperate.openId();
    });
	//隐患上报
	$("#hiddenSubmit").click(function () {
        location.href = "/hidden/fill/"+$.userOperate.key("isLeader");
    });
    //隐患上报limitSubmit
    $("#limitSubmit").click(function () {
        location.href = "/hidden/fill-limit/"+$.userOperate.key("isLeader");
    });


    //我的隐患
    $("#myHidden").click(function () {
        location.href = "/hidden/list?userId="+$.userOperate.userId();
    });
    //本单位隐患
    $("#myDeptHidden").click(function () {
        location.href = "/hidden/deptList?userId="+$.userOperate.userId();
    });

    //隐患分析
    $(".chart").click(function () {
        location.href = "/hidden/chart?userId="+$.userOperate.userId();
    });


    $(document).on("click",".list_desc",function () {
        var status = $(this).find(".status").val();
        var id = $(this).find(".id").val();
        location.href = "/hidden/detailsDept?entityId="+id;
    });




        //监听返回
        $(function(){
            pushHistory();
            window.addEventListener("popstate", function(e) {
                location.href = "/hidden/index_?openId="+$.userOperate.openId();
            }, false);
            function pushHistory() {
                var state = {
                    title: "title",
                    url: "#"
                };
                window.history.pushState(state, "title", "#");
            }
        });

</script>